package com.he.DesignPatterns.decorator.demo1;

/**
 * @description: TODO
 * @Author: HCL
 * @Date: 2024/8/27 11:24
 */
public class Client {
    public static void main(String[] args) {
        FastFood friedRice = new FriedRice();
        System.out.println(friedRice.getDesc()+" "+friedRice.cost());
        System.out.println("================");
        friedRice = new Egg(friedRice); //实现了装饰者类
        System.out.println(friedRice.getDesc()+" "+friedRice.cost());
        System.out.println("================");
        friedRice = new Bacon(friedRice);
        System.out.println(friedRice.getDesc()+" "+friedRice.cost());
    }
}
